import java.io.FileOutputStream;

public class FileOutputStream_ {
    public static void main(String[] args) throws Exception {
        try (FileOutputStream fos = new FileOutputStream("output.txt")) {
           fos.write("Hello World!".getBytes()); 
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
